package com.zmn.plat.dubbo.interfaces.orderconfig.orderstock;

import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import com.zmn.common.dto2.ResponseDTO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 描述：渠道订单库存dubbo接口类
 *
 * @author: tanghongjun
 * @time: 2020/4/21 9:40
 */
@Api(value = "渠道订单库存服务", tags = {"渠道订单库存"})
public interface ChannelOrderStockListRemoteService {

    /**
     * 描述: 根据渠道ID和和时间查询当天渠道对应分类是否关闭了库存
     *
     * @param channelId
     *            渠道ID
     * @param servCategId
     *            服务分类ID
     * @param date
     *            时间
     * @param categId
     *            前台产品二级分类分类ID
     * @return true 已关闭库存 false 未关闭库存 unlimited 不受限制
     * @auther tanghongjun
     * @since 2020/4/25 16:10
     */
    @ApiOperation(value = "根据渠道ID和和时间查询当天渠道对应分类是否关闭了库存", response = ResponseDTO.class, notes = "", tags = {"渠道订单库存"})
    ResponseDTO<String> checkChannelOrderStockStatusByChannelIdAndDateAndCateg(
        @NotNull(message = "channelId不能为空") @Positive(message = "channelId必须为大于0的正整数") @ApiParam(value = "渠道id", required = true) Integer channelId,
        @NotNull(message = "date不能为空") @ApiParam(value = "时间", required = true) Date date,
        @NotNull(message = "servCategId不能为空") @Positive(message = "servCategId必须为大于0的正整数") @ApiParam(value = "服务分类ID", required = true) Integer servCategId,
        @NotNull(message = "categId不能为空") @Positive(message = "categId必须为大于0的正整数") @ApiParam(value = "前台产品二级分类分类ID", required = true) Integer categId);

    /**
     * 描述: 根据渠道ID和和时间查询当天渠道对应分类是否关闭了库存
     *
     * @param channelId
     *            渠道ID
     * @param showProductId
     *            前台产品ID
     * @param date
     *            时间
     * @return true 已关闭库存 false 未关闭库存 unlimited 不受限制
     * @auther tanghongjun
     * @since 2020/4/25 16:10
     */
    @ApiOperation(value = "根据渠道ID和和时间查询当天渠道对应分类是否关闭了库存", response = ResponseDTO.class, notes = "", tags = {"渠道订单库存"})
    ResponseDTO<String> checkChannelOrderStockStatusByChannelIdAndDateAndShowProductId(
        @NotNull(message = "channelId不能为空") @Positive(message = "channelId必须为大于0的正整数") @ApiParam(value = "渠道id", required = true) Integer channelId,
        @NotNull(message = "date不能为空") @ApiParam(value = "时间", required = true) Date date,
        @NotNull(message = "showProductId不能为空") @Positive(message = "showProductId必须为大于0的正整数") @ApiParam(value = "前台产品ID", required = true) Integer showProductId);

    /**
     * 描述: 根据渠道ID和分类查询从今天开始N天内有哪几天渠道关闭了库存
     *
     * @param channelId
     *            渠道ID
     * @param servCategId
     *            服务分类ID
     * @param days
     *            天数，最多不超过30天，超过30天按30天计算
     * @param categId
     *            前台产品二级分类分类ID
     * @return true 已关闭库存 false 未关闭库存
     * @auther tanghongjun
     * @since 2020/4/25 16:10
     */
    @ApiOperation(value = "根据渠道ID和分类查询从今天开始N天内有哪几天渠道关闭了库存", response = ResponseDTO.class, notes = "", tags = {"渠道订单库存"})
    ResponseDTO<List<Date>> listChannelOrderStockStatusByChannelIdAndDateAndCateg(
        @NotNull(message = "channelId不能为空") @Positive(message = "channelId必须为大于0的正整数") @ApiParam(value = "渠道id", required = true) Integer channelId,
        @NotNull(message = "days不能为空") @Positive(message = "days必须为大于0的正整数") @ApiParam(value = "天数", required = true) Integer days,
        @NotNull(message = "servCategId不能为空") @Positive(message = "servCategId必须为大于0的正整数") @ApiParam(value = "服务分类ID", required = true) Integer servCategId,
        @NotNull(message = "categId不能为空") @Positive(message = "categId必须为大于0的正整数") @ApiParam(value = "前台产品二级分类分类ID", required = true) Integer categId);

}
